{% extends "base.html" %}
{% block content %}

    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">新闻列表</h3>
        </div>
        <div class="panel-body">

            <a href="/cms/article_edit/0" class="btn btn-link">添加新闻</a>


            <table class="table ">
                <tr>
                    <th>序号</th>
                    <th>名称</th>
                    <th>发布日期</th>
                </tr>
                {% for p in articles %}
                    <tr>
                        <td>{{ forloop.counter }}</td>
                        <td>{{ p.name }}</td>
                        <td>
                            <div class="btn btn-group">
                                <a href="/cms/article_edit/{{ p.id }}" class="btn btn-info">编辑</a>
                                <a href="/cms/article_delete/{{ p.id }}" class="btn btn-danger">删除</a>
                            </div>

                        </td>

                    </tr>
                {% endfor %}


            </table>


        </div>
    </div>




{% endblock %}


